package com.jkc.xh.adapters;

import android.view.ViewGroup;

import com.jkc.xh.R;
import com.jkc.xh.adapters.core.BaseRecyclerAdapter;
import com.jkc.xh.adapters.viewholder.SearchStockView;
import com.jkc.xh.adapters.viewholder.SearchStockView_;
import com.jkc.xh.models.SearchStockModel;

/**
 * Created by macintosh on 15/11/17.
 */
public class SearchStockAdapter extends BaseRecyclerAdapter<SearchStockModel, SearchStockView> {

    @Override
    protected SearchStockView onCreateItemView(ViewGroup parent, int viewType) {
        return SearchStockView_.build(parent.getContext());
    }

    @Override
    protected void onBindView(SearchStockView itemView, SearchStockModel orderModel, int position) {
        itemView.bind(orderModel);
    }

    public void setListener(OnViewClickListener listener) {
        addOnViewClickListener(R.id.btnAdd, listener);
    }

}
